Deprecate h/v variants of GtkBox
authorMatthias Clasen <mclasen@redhat.com>
Wed, 8 Jun 2011 01:44:24 +0000 (21:44 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 8 Jun 2011 01:44:24 +0000 (21:44 -0400)
This has been discussed in bug 541009.

gtk/gtkhbox.c
gtk/gtkhbox.h
gtk/gtkvbox.c
gtk/gtkvbox.h

index 75d4ab0984676c5d461ccad3ce9d495a6b1e2fda..cade45446fec81aa0a2911613c3010780241a412 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "config.h"
 
+#undef GTK_DISABLE_DEPRECATED
 #include "gtkhbox.h"
 #include "gtkorientable.h"
 
@@ -42,6 +43,8 @@
  * spacing, width, and alignment of #GtkHBox children.
  *
  * All children are allocated the same height.
+ *
+ * GtkHBox has been deprecated, use #GtkBox instead.
  */
 
 
@@ -69,6 +72,8 @@ gtk_hbox_init (GtkHBox *hbox)
  * Creates a new #GtkHBox.
  *
  * Returns: a new #GtkHBox.
+ *
+ * Deprecated: 3.2: Use gtk_box_new() with %GTK_ORIENTATION_HORIZONTAL instead
  */
 GtkWidget *
 gtk_hbox_new (gboolean homogeneous,
index e04c7314cf8e375a6fca4611ff16073f5d6beb2f..670e02a854ab3ecc56d54798156db39c2616d428 100644 (file)
@@ -37,6 +37,8 @@
 
 G_BEGIN_DECLS
 
+#ifndef GTK_DISABLE_DEPRECATED
+
 #define GTK_TYPE_HBOX            (gtk_hbox_get_type ())
 #define GTK_HBOX(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HBOX, GtkHBox))
 #define GTK_HBOX_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HBOX, GtkHBoxClass))
@@ -63,6 +65,8 @@ GType       gtk_hbox_get_type (void) G_GNUC_CONST;
 GtkWidget * gtk_hbox_new      (gboolean homogeneous,
                                gint     spacing);
 
+#endif
+
 G_END_DECLS
 
 #endif /* __GTK_HBOX_H__ */
index 3ab349d4ed9e051094d08c072a88f246d42f941e..f7f91f608878ae2dbb436ad6a4e33cebcc3ca6f4 100644 (file)
@@ -27,6 +27,7 @@
 #include "config.h"
 
 #include "gtkorientable.h"
+#undef GTK_DISABLE_DEPRECATED
 #include "gtkvbox.h"
 
 
@@ -42,6 +43,8 @@
  * spacing, height, and alignment of #GtkVBox children.
  *
  * All children are allocated the same width.
+ *
+ * GtkVBox has been deprecated, use #GtkBox instead.
  */
 
 G_DEFINE_TYPE (GtkVBox, gtk_vbox, GTK_TYPE_BOX)
@@ -68,6 +71,8 @@ gtk_vbox_init (GtkVBox *vbox)
  * Creates a new #GtkVBox.
  *
  * Returns: a new #GtkVBox.
+ *
+ * Deprecated: 3.2: Use gtk_box_new() with %GTK_ORIENTATION_VERTICAL instead
  */
 GtkWidget *
 gtk_vbox_new (gboolean homogeneous,
index 5cd7bb9551d9ed540d9ed5843c03f2be51fa3034..e6cfa29256672372e5115a2aa06a93c4a497a4d1 100644 (file)
@@ -37,6 +37,8 @@
 
 G_BEGIN_DECLS
 
+#ifndef GTK_DISABLE_DEPRECATED
+
 #define GTK_TYPE_VBOX           (gtk_vbox_get_type ())
 #define GTK_VBOX(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_VBOX, GtkVBox))
 #define GTK_VBOX_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_VBOX, GtkVBoxClass))
@@ -63,6 +65,8 @@ GType       gtk_vbox_get_type (void) G_GNUC_CONST;
 GtkWidget * gtk_vbox_new      (gboolean homogeneous,
                                gint     spacing);
 
+#endif
+
 G_END_DECLS
 
 #endif /* __GTK_VBOX_H__ */